﻿using System;
using System.Collections.Generic;

namespace IOA.MES.DataAccess.VModel
{
    /// <summary>
    /// OBA检测
    /// </summary>
    public class VObaInspect : BaseVModel
    {
        private string _orderNo = string.Empty;
        private string _obeNo = string.Empty;
        private string _innerOrderNo = string.Empty;

        #region Public Property

        ///<Summary>
        /// OBA检测单号
        ///</Summary>
        public string ObaNo
        {
            get { return string.IsNullOrWhiteSpace(_obeNo) ? string.Empty : _obeNo; }
            set { _obeNo = value; }
        }

        ///<Summary>
        /// 内部订单号
        ///</Summary>
        public string InnerOrderNo
        {
            get { return string.IsNullOrWhiteSpace(_innerOrderNo) ? string.Empty : _innerOrderNo; }
            set { _innerOrderNo = value; }
        }

        ///<Summary>
        /// 订单号
        ///</Summary>
        public string OrderNo
        {
            get { return string.IsNullOrWhiteSpace(_orderNo) ? string.Empty : _orderNo; }
            set { _orderNo = value; }
        }

        ///<Summary>
        /// 检测状态
        ///</Summary>
        public Enum.ObaStatus Status { get; set; }
        public string CNStatus { get { return !System.Enum.IsDefined(typeof(Enum.ObaStatus), Status) ? string.Empty : EnumConvert.ToDesc(Status); } }

        ///<Summary>
        /// FinishTime
        ///</Summary>
        public DateTime? FinishTime { get; set; }

        /// <summary>
        /// OBA检测包装
        /// </summary>
        public List<VObaPack> Packs { get; set; } = new List<VObaPack>();

        /// <summary>
        /// OBA过站列表
        /// </summary>
        public List<VObaSite> Sites { get; set; } = new List<VObaSite>();
        #endregion
    }
}
